package com.eric.statemachinedemo.exception;

import com.eric.statemachinedemo.constant.ResponseCodeEnum;

public class ProcessException extends RuntimeException {

    private ResponseCodeEnum responseCode;

    public ProcessException(ResponseCodeEnum responseCode) {
        //异常信息为错误代码+异常信息
        super("错误代码：" + responseCode.code());
        this.responseCode = responseCode;
    }

    public ResponseCodeEnum getResponseCode(){
        return this.responseCode;
    }
}
